package com.sinochem.iot.rule.mapper;

import com.sinochem.iot.rule.model.TriggerRuleDetail;
import com.sinochem.iot.rule.model.TriggerRuleDetailExample;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
@Mapper
public interface TriggerRuleDetailMapper {
    /**
     *
     * @mbggenerated
     */
    int countByExample(TriggerRuleDetailExample example);

    /**
     *
     * @mbggenerated
     */
    int deleteByPrimaryKey(Integer id);

    /**
     *
     * @mbggenerated
     */
    int insert(TriggerRuleDetail record);

    /**
     *
     * @mbggenerated
     */
    int insertSelective(TriggerRuleDetail record);

    /**
     *
     * @mbggenerated
     */
    List<TriggerRuleDetail> selectByExample(TriggerRuleDetailExample example);

    /**
     *
     * @mbggenerated
     */
    TriggerRuleDetail selectByPrimaryKey(Integer id);

    /**
     *
     * @mbggenerated
     */
    int updateByPrimaryKeySelective(TriggerRuleDetail record);

    /**
     *
     * @mbggenerated
     */
    int updateByPrimaryKey(TriggerRuleDetail record);

    /**
     * 根据规则id删除
     * @param ruleId
     * @return
     */
    int deleteByRuleId(Integer ruleId);

    /**
     * 批量添加
     * @param list
     * @return
     */
    int insertBatch(List<TriggerRuleDetail> list);

    /**
     * 根据规则id修改状态
     * @param triggerRuleDetail
     * @return
     */
    int updateStatusByRuleId(TriggerRuleDetail triggerRuleDetail);
}